Automating Black-Box Property Based Testing

نویسنده

  • Jonas Duregård
چکیده

Black-box property based testing tools like QuickCheck allow developers to write elegant logical specifications of their programs, while still permitting unrestricted use of the same language features and libraries that simplify writing the programs themselves. This is an improvement over unit testing because a single property can replace a large collection of test cases, and over more heavy-weight white-box testing frameworks that impose restrictions on how properties and tested code are written. In most cases the developer only needs to write a function returning a boolean, something any developer is capable of without additional training. This thesis aims to further lower the threshold for using property based testing by automating some problematic areas, most notably generating test data for user defined data types. Writing procedures for random test data generation by hand is time consuming and error prone, and most fully automatic algorithms give very poor random distributions for practical cases. Several fully automatic algorithms for generating test data are presented in this thesis, along with implementations as Haskell libraries. These algorithms all fit nicely within a framework called sized functors, allowing re-usable generator definitions to be constructed automatically or by hand using a few simple combinators. Test quality is another difficulty with property based testing. When a property fails to find a counterexample there is always some uncertainty in the strength of the property as a specification. To address this problem we introduce a black-box variant of mutation testing. Usually mutation testing involves automatically introducing errors (mutations) in the source code of a tested program to see if a test suite can detect it. Using higher order functions, we mutate functions without accessing their source code. The result is a very light-weight mutation testing procedure that automatically estimates property strength for QuickCheck properties.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Automating Requirements-based Testing for Hardware Design 1

This paper presents a methodology for automating the evaluation of partial designs using black-box testing techniques. The methodology generates black-box evaluation testsets using a novel semantic graph data model which maintains the relationships between design and requirements data. The testset is used to simulate the design module and the related requirements, thus generating a set of expec...

متن کامل

Distributed Black-Box Software Testing Using Negative Selection

In the software development process, testing is one of the most human intensive steps. Many researchers try to automate test case generation to reduce the manual labor of this step. Negative selection is a famous algorithm in the field of Artificial Immune System (AIS) and many different applications has been developed using its idea. In this paper we have designed a new algorithm based on nega...

متن کامل

Evaluating Evolutionary Testability with Software-Measurements

Test case design is the most important test activity with respect to test quality. For this reason, a large number of testing methods have been developed to assist the tester with the definition of appropriate, error-sensitive test data. Besides black-box tests, white-box tests are the most prevalent. In both cases, complete automation of test case design is difficult. Automation of black-box t...

متن کامل

Towards a Property-based Testing Environment with Applications to Security-Critical Software

We consider an approach to testing that combines white-box and black-box techniques. Black-box testing is used for testing a program's e ects against its speci cation. White-box testing is essential if subtle implementation errors are to be identi ed, e.g., errors due to race conditions. Full white-box testing is a large task. However, for many properties, only a small portion of the program is...

متن کامل

Linking Requirements and Design Data for Automated Functional Evaluation

This paper presents a methodology for automating the evaluation of complex hierarchical designs using black-box testing techniques. Based on an exploration model for design, this methodology generates evaluation tests using a novel semantic graph data model which captures the relationships between the related design and requirements data. Using these relationships, equivalent tests are generate...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2016